package com.kefu.call.vo;

import javax.validation.constraints.Size;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractInsertVo;
import com.kefu.call.model.CurlProfile;
import cn.hutool.core.util.IdUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author CodeGenerator
 * @date 2022/07/24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "驱动")
public class CurlProfileInsertVo extends AbstractInsertVo<CurlProfile> {

    
    @ApiModelProperty(value = "名称")
    private String name;
    
    @ApiModelProperty(value = "值 [internal,external]")
    private String val;
    
    @ApiModelProperty(value = "IP地址【$${local_ip_v4}代表本地地址】，必须内网地址")
    private String ip;
    @ApiModelProperty(value = "端口")
    private Integer port;
    @ApiModelProperty(value = "是否开启")
    private Integer istrue;
    
    @ApiModelProperty(value = "媒体地址，必须内网地址")
    private String rtpip;
    
    @ApiModelProperty(value = "日志地址")
    private String captureserver;
    
    @ApiModelProperty(value = "如果fs再外网，需要改成外网地址。来做nat处理。contact")
    private String extSip;
    
    @ApiModelProperty(value = "如果fs再外网，需要改成外网地址。来做nat处理。sdp地址")
    private String extRtp;

    @Override
    public CurlProfile convert() {
        CurlProfile info = new CurlProfile();
	    info.setName(name);
	    info.setVal(val);
	    info.setIp(ip);
	    info.setPort(port);
	    info.setIstrue(istrue);
	    info.setRtpip(rtpip);
	    info.setCaptureserver(captureserver);
	    info.setExtSip(extSip);
	    info.setExtRtp(extRtp);
        KefuContext context = KefuContext.getKefuContext();
		//info.setFOid(IdUtil.simpleUUID());
	    return info;
	}
}